package com.sun.dao;

import com.sun.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author: glorysun
 * @date: 2020/8/5
 */
@Mapper
@Repository
public interface UserDao {

    //用户名密码是否存在
    @Select("select * from blog.t_user where username=#{username} and password=#{password}")
    public User checkUserAndPassword(@Param("username") String username,@Param("password") String password);

    @Select("select * from blog.t_user where id=#{id}")
    public User selectById(@Param("id") Long id);
}
